Skip to main content

Chart

Type

widget

Summary

This widget displays data in the form of charts.

Description

The Chart widget is a wrapper for Chart.js v3.7.0 in LiveCode. It allows you to create beautiful and highly customizable charts, in a simple way. Data can be displayed as a line graph, bar chart, radar chart, donut/pie chart, polar chart, bubble chart or scatter plot.

Compatibility and Support

OS

mac

windows

linux

ios

android

web

Children Properties

Property

NameSummarySyntax
titlePaddingPadding to apply around the title.set the titlePadding of widget to <integer> get the titlePadding of widget
legendAlignAlignment of the Legendset the legendAlign of widget to {"start" | "center" | "end"} get the legendAlign of widget
csvDataGets or sets the data to display the chart in CSV formatset the csvData of widget to <CSV Data> get the csvData of widget
chartJSONDataGets or sets the data to display the chart in JSON formatset the chartJSONData of widget to <JSON string> get the chartJSONData of widget
datasetLabelslabel showing each data setset the DatasetLabels of widget to <Labels> get the DatasetLabels of widget
subtitleAlignAlignment of the subtitleset the subtitleAlign of widget to {"start" | "center" | "end"} get the subtitleAlign of widget
titleFullSizePoint out that the title box should occupy the entire width/height of box.set the titleFullSize of widget to {true | false} get the titleFullSize of widget
titleSpecifies the string to display as the title of the chart.get the title of <widget> set the title of <widget> to <pTitle>
chartJSONOptionsGets or sets options for displaying the chart in JSON formatset the chartJSONOptions of widget to <JSON string options> get the chartJSONOptions of widget
legendTextColorThe text color of the chart's legendset the legendTextColor of widget to {"RGBA"} get the legendTextColor of widget
subtitlePaddingPadding to apply around the subtitle.set the subtitlePadding of widget to <integer> get the subtitlePadding of widget
showTitleSpecifies whether title of the chart is displayed.set the showTitle of widget to {true | false} get the showTitle of widget
subtitleFullSizePoint out that the subtitle box should occupy the entire width/height of box.set the subtitleFullSize of widget to {true | false} get the subtitleFullSize of widget
subtitleFontSpecifies the font face of text in the subtitle of chart.set the subtitleFont of widget to fontName get the subtitleFont of widget
titleFontLineHeightDetermines the height of the title line.set the titleFontLineHeight of widget to {"normal" | "inherit" | "initial" | "revert" | "unset" | number [ em | % ]} get the titleFontLineHeight of widget
subtitleSpecifies the string to display as the subtitle of the chart.set the subtitle of widget to subtitleString
colorSetNamesNames of color setsget the colorSetNames of widget
lineTensiondetermines whether line charts are drawn curved or not.set the lineTension of widget to <number> get the lineTension of widget
pointStyleThe styles of the points that are drawn on the charts.set the pointStyle of widget to {circle | cross | crossRot | dash | line | rect | rectRounded | rectRot | star | triangle} get the pointStyle of widget
subtitleFontLineHeightDetermines the height of the subtitle line.set the subtitleFontLineHeight of widget to {"normal" | "inherit" | "initial" | "revert" | "unset" | number [ em | % ]} get the subtitleFontLineHeight of widget
titlePositionThe position of the chart's titleset the titlePosition of widget to {"top" | "left" | "bottom" | "right"} get the titlePosition of widget
titleFontSizeSpecifies the point size of text displayed in titleset the titleFontSize of widget to <pointSize> get the titleFontSize of widget
titleFontSpecifies the font face of text in the title of chart.set the textFont of widget to fontName get the textFont of widget
chartBackgroundColorSpecifies an chart background color.set the chartBackgroundColor of widget to {RGB | RGBA} get the chartBackgroundColor of widget
scaleXBorderDashLength and spacing of dashes on the x-axis line.set the scaleXBorderDash of widget to pixelsOn [, pixelsOff] get the scaleXBorderDash of widget
showLegendSpecifies whether legend of the chart is displayed.set the showLegend of widget to {true | false} get the showLegend of widget
titleColorSpecify a color for the title textset the titleColor of widget to {Color RGB | Color RGBA} get the titleColor of widget
subtitleFontStyleSpecify the appearance of the subtitle textset the subtitleFontStyle of widget to {"normal" | "italic" | "oblique" | "initial" | "inherit"} get the subtitleFontStyle of widget
showSubtitleSpecifies whether subtitle of the chart is displayed.set the showSubtitle of widget to {true | false} get the showSubtitle of widget
titleFontStyleSpecify the appearance of the banner textset the titleFontStyle of widget to {"normal" | "italic" | "oblique" | "initial" | "inherit"} get the titleFontStyle of widget
chartTypeThis property defines the type of chart to be displayedset the chartType of widget to { line | bar | radar | donut | foot | polar | bubble | scatter } get the chartType of widget
maxXScalethe maximum value that the scale can take on the x-axisset the maxXScale of widget to <number> get the maxXScale of widget
lineBorderDashLength and spacing of the dashes in the line of the line chart.set the lineBorderDash of widget to pixelsOn [, pixelsOff] get the lineBorderDash of widget
subtitleColorSpecify a color for the subtitle textset the subtitleColor of widget to {Color RGB | Color RGBA} get the subtitleColor of widget
scaleYStackedStack the data on the y-axisset the scaleYStacked of widget to {ture | false} get the scaleYStacked of widget
colorSetDefault color styles with which the chart is drawn.set the Colorset of widget to <Colorset name> get the Colorset of widget
backgroundDataColorsThe background color of the data setsset the backgroundDataColors of widget to {RGB | RGBA} get the backgroundDataColors of widget
maxYScalethe maximum value that the scale can take on the y-axisset the maxYScale of widget to <number> get the maxYScale of widget
lockChartUpdatesBlock the update of the chart when changing its properties.set the lockChartUpdates of widget to {true | false} get the lockChartUpdates of widget
scaleXStackedStack the data on the x-axisset the scaleXStacked of widget to {ture | false} get the scaleXStacked of widget
pointRadiusThe radius of the points that are drawn on the charts.set the pointRadius of widget to <number> get the pointRadius of widget
dataBorderColordataset border colorset the dataBorderColor of widget to {RGB | RGBA} get the dataBorderColor of widget
showXScalehides and shows the scale on the x-axisset the showXScale of widget to {ture | false} get the showXScale of widget
dataLabelsGets or sets the labels for each datasetset the dataLabels of widget to {label 1,label 2, ...} get the dataLabels of widget
minYScalethe minimum value that the scale can take on the y-axisset the minYScale of widget to <number> get the minYScale of widget
dataBorderWidthdataset border widthset the dataBorderWidth of widget to <integer> get the dataBorderWidth of widget
subtitlePositionThe position of the chart's subtitleset the subtitlePosition of widget to {"top" | "left" | "bottom" | "right"} get the subtitlePosition of widget
legendUsePointStyleShows the style of the points in the legend.set the legendUsePointStyle of widget to {true | false} get the legendUsePointStyle of widget
minXScalethe minimum value that the scale can take on the x-axisset the minXScale of widget to <number> get the minXScale of widget
titleFontWeightThis property sets the weight (or bold) of the title font.set the titleFontWeight of widget to {"normal" | "bold" | "lighter" | "bolder" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "inherit" | "initial" | "revert" | "unset"} get the titleFontWeight of widget
enableToolTipEnable or disable chart tooltips.set the enableToolTip of widget to {true | false} get the enableToolTip of widget
titleAlignAlignment of the titleset the titleAlign of widget to {"start" | "center" | "end"} get the titleAlign of widget
indexAxisSets the major axis for charts that use the Cartesian coordinate system.set the indexAxis of widget to {"x" | "y"} get the indexAxis of widget
scaleXTextSizethe size of the text in x-axis scaleset the scaleXTextSize of widget to <integer> get the scaleXTextSize of widget
scalesTextColorscales text colorset the scalesTextColor of widget to {RGB | RGBA} get the scalesTextColor of widget
showYScalehides and shows the scale on the y-axisset the showYScale of widget to {ture | false} get the showYScale of widget
subtitleFontSizeSpecifies the point size of text displayed in subtitleset the subtitleFontSize of widget to pointSize get the subtitleFontSize of widget
scaleYTextSizethe size of the text in y-axis scaleset the scaleYTextSize of widget to <integer> get the scaleYTextSize of widget
enableAnimationsEnable and disable animations in chartset the enableAnimations of widget to {true | false} get the enableAnimations of widget
scaleYBorderDashLength and spacing of dashes on the y-axis line.set the scaleYBorderDash of widget to pixelsOn [, pixelsOff] get the scaleYBorderDash of widget
subtitleFontWeightThis property sets the weight (or bold) of the subtitle font.set the subtitleFontWeight of widget to {"normal" | "bold" | "lighter" | "bolder" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "inherit" | "initial" | "revert" | "unset"} get the subtitleFontWeight of widget
legendPositionThe position of the chart's legendset the legendPosition of widget to {"top" | "left" | "bottom" | "right"} get the legendPosition of widget
gridLineColorThe color of chart grid linesset the gridLineColor of widget to {RGB | RGBA} get the gridLineColor of widget
tsvDataGets or sets the data to display the chart in TSV formatset the tsvData of widget to <TSV Data> get the tsvData of widget